package story
{
	import util.ScriptObject;

	public class StoryObject extends ScriptObject
	{
		public static const TYPE_BACKGROUND:String = "bg";
		public static const TYPE_TALK_BOX:String = "talk_box";
		public static const TYPE_SOUND:String = "sound";
		public static const TYPE_CHAR:String = "char";
		public static const TYPE_TALK:String = "talk";
		
		private var m_strType:String;
		private var m_nIndex:int;
		private var m_bFlag:Boolean;
		private var m_strName:String;
		private var m_strTalk:String;
		
		public function get Type():String
		{ return m_strType; }
		public function set Type( value:String ):void
		{ m_strType = value; }
		
		public function get Index():int
		{ return m_nIndex; }
		public function set Index( value:int ):void
		{ m_nIndex = value; }
		
		public function get Flag():Boolean
		{ return m_bFlag; }
		public function set Flag( value:Boolean ):void
		{ m_bFlag = value; }
		
		public function get Name():String
		{ return m_strName; }
		public function set Name( value:String ):void
		{ m_strName = value; }
		
		public function get Talk():String
		{ return m_strTalk; }
		public function set Talk( value:String ):void
		{ m_strTalk = value; }
		
		public function StoryObject( node:XML )
		{
			trace( node.type, node.index, node.flag );
			
			m_strType = node.type;
			m_nIndex = node.index;
			m_bFlag = node.flag;
			m_strName = node.name;
			m_strTalk = node.talk;
		}
	}
}